<?php

namespace App\Http\Controllers;

use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;


class LoginController extends Controller
{
    
    public function index(Request $request)
    {
    	// $name = $request->input('id');

    	$users = DB::select('select * from fly_user where user_id = ?', [2]);

    	$users = DB::table('fly_user')->get();


    	// $users = DB::table('users')
     //        ->join('contacts', 'users.id', '=', 'contacts.user_id')
     //        ->join('orders', 'users.id', '=', 'orders.user_id')
     //        ->select('users.*', 'contacts.phone', 'orders.price')
     //        ->where('dfdf','dfd')
     //        ->get();

        // var_dump($users);


        $user = User::all();

        var_dump($user);

        return view('index',['title'=>'学并思']);
    }

    public function show($id='')
    {
    	var_dump($id);
    }
}